import { CommonAttrsEnum, TextStyleActionEnums, TitleActionEnums } from "@/enums/titleEnums";
import { IComponentMapsType } from "./renders";
import { IActionOpts } from "@/types";
import { ComboboxData } from "@mantine/core";

export type ICommonAttrKeys = TitleActionEnums | TextStyleActionEnums | CommonAttrsEnum

export interface ICmptRenderSchema {
  label: string
  type: IComponentMapsType
  value: any
  evt: ICommonAttrKeys
  data?: ComboboxData
}

export interface RenderSchemaToCmptOpts {
  onAction: (opts: ICmptAttrsActions) => void
}

export type ICmptAttrsActions = IActionOpts<ICmptRenderSchema['evt']>